<!DOCTYPE html>
<html lang="zh"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>管理模块--客户公海</title>
    <link rel="icon" href="favicon.ico" type="images/ico">
    <meta name="author" content="dc">
    <link rel="stylesheet" type="text/css" href="/css/materialdesignicons.min.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/animate.min.css">
    <link rel="stylesheet" type="text/css" href="/css/style.min.css">
    <link href="/js/bootstrap-table/bootstrap-table.min.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/js/jquery-confirm/jquery-confirm.min.css"/>
    <!--时间选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="/js/bootstrap-datepicker/bootstrap-datepicker3.min.css">
    <link rel="stylesheet" href="/css/input_tags.css"/>
    <!-- 多选下拉 -->
    <link rel="stylesheet" href="/css/bootstrap-select.css" type="text/css"/>
    <link rel="stylesheet" href="/js/need/verfont.css" />
    <link rel="stylesheet" href="/js/need/select.2.0.css" />
    <link rel="stylesheet" href="/css/skin.css"/>
    <link rel="stylesheet" href="/css/customerManager/addCustomerPool.css"/>
    <link rel="stylesheet" href="/css/customerManager/customerPoolForm.css"/>
</head>
<body>
<div>
    <div class="container-fluid p-t-15">
        <div class="row">
            <div class="col-sm-12">
                <div class="card">
                    <div class="card-header">
                        <h1>客户公海</h1>
                    </div>
                    <div class="card-body">
                        <input type="hidden" id="customerPoolId" name="customerPoolId">
                        <input type="hidden" id="isAdmin" name="isAdmin" th:value="${isAdmin}">
                        <div class="selector-box">
                            <dl>
                                <dt>地区：</dt>
                                <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(3,'')">不限</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'110000')">北京</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'130000')">河北</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'120000')">天津</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'410000')">河南</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'140000')">山西</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'310000')">上海</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'440000')">广东</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'370000')">山东</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'210000')">辽宁</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'340000')">安徽</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'520000')">贵州</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'330000')">浙江</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(3,'510000')">四川</a></dd>
                            </dl>
                            <dl>
                                <dt>行业：</dt>
                                <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(4,'')">不限</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'1')">农、林、牧、渔业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'4')">电力、热力、燃气及水生产和供应业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'9')">信息传输、软件和信息技术服务业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'14')">水利、环境和公共设施管理业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'8')">住宿和餐饮业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'10')">金融业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'11')">房地产业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'5')">建筑业</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(4,'16')">教育</a></dd>
                            </dl>
                            <dl>
                                <dt>热门：</dt>
                                <dd><a href="JavaScript:void(0);" class="active" onclick="searchCustomerPoolList(5,'')">不限</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(5,'医疗')">医疗</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(5,'餐饮')">餐饮</a></dd>
                                <dd><a href="JavaScript:void(0);" onclick="searchCustomerPoolList(5,'教育')">教育</a></dd>
                            </dl>
                        </div>
                        <div class="row content-action">
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <!-- 全部 本周 本月 本年 -->
                                <div class="time-search pull-left">
                                    <input type="hidden" id="dateType" name="dateType"/>
                                    <div class="all active-second" onclick="selectTime('all')">全部</div>
                                    <div class="week"  onclick="selectTime('week')">本周</div>
                                    <div class="month" onclick="selectTime('month')">本月</div>
                                    <div class="year" onclick="selectTime('year')">本年</div>
                                </div>
                                <div th:if="${isAdmin} == true">
                                    <button type="button" class="btn btn-label btn-success" onclick="addCustomerPool()">
                                        <label><i class="mdi mdi-plus-circle-outline"></i></label>新增客户池
                                    </button>
                                </div>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                <div class="pull-right">
                                    <div class="min-search pull-left">
                                        <input class="form-control" type="text" placeholder="请输入客户池名称"
                                               id="customerPoolNameMin" name="customerPoolNameMin"
                                               onkeyup="this.value=this.value.replace(/^\s+|%|\s+$/g, '')">
                                        <button class="btn btn-primary" type="button" onclick="searchCustomerPoolList(1)">
                                            <i class="mdi mdi-magnify"></i><span>搜索</span>
                                        </button>
                                    </div>
                                    <button class="btn btn-default btn-senior" data-toggle="collapse"
                                            data-target="#filterContent" aria-expanded="false"
                                            aria-controls="filterContent">
                                        <i class="mdi mdi-sort-variant"></i>高级筛选
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="collapse filter-content" id="filterContent">
                            <div class="row">
                                <div class="form-group col-lg-2 col-md-2 col-sm-4 col-xs-12">
                                    <label for="customerPoolNameSearch">客户池名称</label>
                                    <div>
                                        <input class="form-control" type="text" placeholder="请输入客户池名称"
                                               id="customerPoolNameSearch" name="customerPoolNameSearch">
                                    </div>
                                </div>
                                <div class="form-group col-lg-2 col-md-2 col-sm-4 col-xs-12">
                                    <label for="tag">标签名称</label>
                                    <div>
                                        <input class="form-control" type="text" placeholder="请输入标签" id="tag" name="tag" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group col-lg-2 col-md-2 col-sm-4 col-xs-12">
                                    <label for="createTm">创建时间</label>
                                    <div>
                                        <input id="createTm" type="text" class="form-control" placeholder="请选择创建时间" autocomplete="off">
                                    </div>
                                </div>
                                <div class="form-group col-lg-6 col-md-6 col-sm-6 col-xs-12">
                                    <label>&nbsp;</label>
                                    <div class="text-right">
                                        <button class="btn btn-primary" type="button" onclick="searchCustomerPoolList(2)">
                                            <i class="mdi mdi-magnify"></i><span>搜索</span></button>
                                        <button class="btn btn-default" onclick="clearAllData()">重置</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table id="customerPoolTableList"></table>
                    </div>
                    <!-- 客户池修改弹层 -->
                    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" id="editModel"
                         data-backdrop="static" data-keyboard="false">
                        <div class="modal-dialog modal-lg" role="document">
                            <div class="modal-content">
                                <div class="modal-body" style="min-height: 200px;">
                                    <!-- start -->
                                    <div class="card-header">
                                        <h1>客户池修改</h1>
                                        <div type="button" class="close" data-dismiss="modal" aria-hidden='true'>x</div>
                                    </div>
                                    <form class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label" for="customerPoolName">客户池名称</label>
                                            <div class="col-sm-4">
                                                <input type="text" id="customerPoolName" class="form-control" placeholder="请输入客户池名称">
                                            </div>
                                            <label class="col-sm-2 control-label" for="source">来源</label>
                                            <div class="col-sm-4">
                                                <input type="text" id="source" class="form-control" placeholder="请输入来源">
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">所在地区</label>
                                            <div class="col-sm-4 " style="display: flex;">
                                                <select onchange="changeCity()" id="province" name="province" style="margin-right: 20px;width: 180px;" class="form-control" type="text" title="请选择" data-live-search="true"></select>
                                                <select id="city" name="city" style="width: 180px;" class="form-control" type="text" title="请选择" data-live-search="true"></select>
                                            </div>
                                            <label class="col-sm-2 control-label" for="industry">所在行业</label>
                                            <div class="col-sm-4 ">
                                                <select class="form-control" id="industry" type="text" data-live-search="true">
                                                    <option value="">请输入行业</option>
                                                    <option value="1">农、林、牧、渔业</option>
                                                    <option value="2">采矿业</option>
                                                    <option value="3">制造业</option>
                                                    <option value="4">电力、热力、燃气及水生产和供应业</option>
                                                    <option value="5">建筑业</option>
                                                    <option value="6">批发和零售业</option>
                                                    <option value="7">交通运输、仓储和邮政业</option>
                                                    <option value="8">住宿和餐饮业</option>
                                                    <option value="9">信息传输、软件和信息技术服务业</option>
                                                    <option value="10">金融业</option>
                                                    <option value="11">房地产业</option>
                                                    <option value="12">租赁和商务服务业</option>
                                                    <option value="13">科学研究和技术服务业</option>
                                                    <option value="14">水利、环境和公共设施管理业</option>
                                                    <option value="15">居民服务、修理和其他服务业</option>
                                                    <option value="16">教育</option>
                                                    <option value="17">卫生和社会工作</option>
                                                    <option value="18">文化、体育和娱乐业</option>
                                                    <option value="19">公共管理、社会保障和社会组织</option>
                                                    <option value="20">国际组织</option>
                                                    <option value="21">其他</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">客户池类型</label>
                                            <div class="col-sm-4">
                                                <select class="form-control" id="poolType" type="text" title="请选择" data-live-search="true">
                                                    <option value="1">优</option>
                                                    <option value="2">良</option>
                                                    <option value="3">一般</option>
                                                </select>
                                            </div>
                                            <label class="col-sm-2 control-label" for="capacity">客户池容量</label>
                                            <div class="col-sm-4" style="display: flex;align-items: center;">
                                                <input type="text" id="capacity" class="form-control" placeholder="请输入客户池容量" oninput="value=value.replace(/[^\d]/g,'')">
                                                <span style="padding-left: 16px;">条</span>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">客户池性质</label>
                                            <div class="col-sm-8" style="display: flex;align-items: center;height: 38px;">
                                                <div>
                                                    <input type="radio" value="1" name="nature" style="margin-right: 6px;"
                                                           onclick="seleceChi(1)">全国公有池
                                                </div>
                                                <div style="margin-left: 20px;display: flex;align-items: center;">
                                                    <input type="radio" value="2" name="nature" onclick="seleceChi(2)" style="margin-right: 6px;">分公司公有池
                                                    <div id="searchBox">
                                                        <!--<div id="search"  style="margin-left: 16px;width: 230px;"></div>-->
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label" id="companyLabel" for="companySelect">所属公司</label>
                                            <div class="col-sm-4" id="companyDiv">
                                                <select id="companySelect" name="companySelect" class="form-control" type="text"
                                                        placeholder="请选择所属公司"></select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">标签</label>
                                            <div class="col-sm-10">
                                                <div style="width:100%;" id="tagBox">
                                                    <!--<input type="text" name="staticPath" value="" id="staticPath2"/>-->
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                    <div>
                                        <h4 style="font-size: 14px;">规则设置</h4>
                                        <div style="display: flex;">
                                            <div class="one" style="flex-grow: 1;">
                                                <div class="title-rule">领取规则</div>
                                                <form class="form-horizontal col-sm-12">
                                                    <div class="form-group">
                                                        <label class="col-sm-6 control-label">最多领取数量</label>
                                                        <div class="col-sm-6">
                                                            <input type="text" id="maximumNumber" class="form-control"
                                                                   placeholder="请输入最多领取数量" oninput="value=value.replace(/[^\d]/g,'')">
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-6 control-label">同一客户不能连续领取间隔</label>
                                                        <div class="col-sm-6" style="display: flex; align-items: center;" >
                                                            <input type="text" id="timeInterval" class="form-control"
                                                                   placeholder="请输入领取间隔" oninput="value=value.replace(/[^\d]/g,'')">
                                                            <span style="padding-left: 6px;">h</span>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-6 control-label">任意客户不能连续领取间隔</label>
                                                        <div class="col-sm-6" style="display: flex; align-items: center;" >
                                                            <input type="text" id="anyTimeInterval" class="form-control"
                                                                   placeholder="请输入领取间隔" oninput="value=value.replace(/[^\d]/g,'')">
                                                            <span style="padding-left: 6px;">s</span>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-6 control-label" id="timeLimitLabel">其它公司时间限制</label>
                                                        <div class="col-sm-6" style="display: flex; align-items: center;" id="timeLimitDiv">
                                                            <input type="text" id="timeLimit" class="form-control"
                                                                   placeholder="请输入时间限制" oninput="value=value.replace(/[^\d]/g,'')">
                                                            <span style="padding-left: 6px;">h</span>
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                            <div class="two" style="flex-grow: 1;">
                                                <div class="title-rule" style="padding-left: 34px;">退回规则</div>
                                                <form class="form-horizontal col-sm-12">
                                                    <div class="form-group">
                                                        <label class="col-sm-5 control-label">无跟进退回时间间隔</label>
                                                        <div class="col-sm-7" style="display: flex; align-items: center;" >
                                                            <input type="text" id="returnInterval" class="form-control"
                                                                   placeholder="请输入无跟进退回时间间隔" oninput="value=value.replace(/[^\d]/g,'')">
                                                            <span style="padding-left: 6px;">h</span>
                                                        </div>
                                                    </div>
                                                </form>
                                            </div>
                                        </div>
                                    </div>
                                    <div style="width: 100%;display: flex;margin-bottom: 30px;">
                                        <div style="margin-right: 20px;">客户池详情</div>
                                        <textarea id="addDetail" class="addDetail" style="width: 89%;padding: 16px;border: 1px solid #e4e4e4;" rows="6" placeholder="请输入客户池详情"></textarea>
                                    </div>
                                    <div style="width: 100%;display: flex;justify-content: center; margin-top: 30px;">
                                        <div type="button" class="btn btn-primary" onclick="editCustomerPool()" style="margin-right: 20px;">确定</div>
                                        <div type="button" class="btn btn-default" data-dismiss="modal">取消</div>
                                    </div>
                                    <!-- end -->
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/js/main.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="/js/bootstrap-table/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="/js/popper.min.js"></script>
<script type="text/javascript" src="/js/jquery.cookie.min.js"></script>
<!--时间选择插件-->
<script src="/js/bootstrap-datetimepicker/moment.min.js"></script>
<script src="/js/jquery-confirm/jquery-confirm.min.js"></script>
<script src="/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js"></script>
<script src="/js/bootstrap-datetimepicker/locale/zh-cn.js"></script>
<!--日期选择插件-->
<script src="/js/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script src="/js/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.min.js"></script>
<script src="/js/crm/common/city.js"></script>
<script src="/js/crm/common/common.js"></script>
<script src="/js/crm/common/input-tag.js"></script>
<!-- 多选框下拉 -->
<script type="text/javascript" src="/js/bootstrap-select.js"></script>
<script src="/js/verSelect.2.0.js"></script>
<!-- 子页面公用js -->
<script src="/js/crm/common/pageCommon.js"></script>
<script src="/js/crm/customerManager/customerPoolForm.js"></script>

</html>